import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);


export default new Vuex.Store({
    state: {
        topListIds:[],
		nextId:''
    },
    mutations: {
        setTopListIds(state, value){
            state.topListIds = value
        },
		setNextId(state, value){
			for(let i=0;i<state.topListIds.length;i++){
				if(state.topListIds[i].id == value){
					state.nextId = state.topListIds[i+1].id
				}
			}
		}
    },
    actions: {},
    getters: {}
})